<?php

class Back_Model_Config extends Jnd_Model_Abstract
{

    protected $id = 0;

    protected $nom;

    protected $valeur = "";

    protected $description = "";

    /**
     * @see Jnd_Model_Abstract::_getMapper()
     * @return Back_Model_Mapper_Config
     */
    public function _getMapper() {
        return parent::_getMapper();
    }
    
    /**
     *
     * @see Jnd_Model_Abstract::getId()
     */
    public function getId ()
    {
        return $this->id;
    }

    /**
     *
     * @see Jnd_Model_Abstract::setId()
     */
    public function setId ($id)
    {
        $this->id = $id;
    }

    /**
     *
     * @see Jnd_Model_Abstract::charger()
     */
    public function charger ($id)
    {
        $donnees = $this->_getMapper()->chargerParNom($id);
        $this->setOptions($donnees);
    }
    
    public static function recuperationValeurParCle ( $valeurCle, $champRetour) {
        $mapper = new Back_Model_Mapper_Config();
        return $mapper->recuperationValeurParId($valeurCle, $champRetour);
    }
}
